-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Channel info #70
Channel info #70
Conversation
Pull Request Test Coverage Report for Build 136
💛 - Coveralls |
@@ -396,6 +396,10 @@ func populateMessage(message models.Message, msgType models.MessageType, channel | |||
message.ChannelName = name | |||
} | |||
|
|||
// make channel variables available | |||
message.Vars["_channel.id"] = message.ChannelID | |||
message.Vars["_channel.name"] = message.ChannelName // will be empty if it came via DM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DM's have a channel ID in Slack, too. Are you sure this wont get populated? It would actually be useful to me if it did.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just _channel.name
will be empty, _channel.id
will be there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess that makes sense. Although on the eDiscovery API they have names, too. (based on the participants)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, not familiar with that. There's a story for looking at Conversations API (#46) that might help. Though in a 1:1 conversation, name still seems to be omitted, it seems, according to: https://api.slack.com/methods/conversations.info
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think its fine to have an empty name for DMs. Just an interesting idea.
Co-Authored-By: wass3r <[email protected]>
@JordanSussman one more time? i think we resolved everything. |
❤ THANKS FOR HELPING OUT :D
Proposed change
This makes
{_channel.name}
and{_channel.id}
available as variables in your rules.Types of changes
What types of changes is this pull request introducing to flottbot? Put an
x
in the boxes that applyChecklist
You can fill this out after creating your PR. Put an
x
in the boxes that apply